<template>
  <el-menu mode="horizontal"
           default-active="1"
  @select="oncilckmenu">
    <el-menu-item index="1">编辑</el-menu-item>
    <el-menu-item index="2">阅读</el-menu-item>
  </el-menu>
  <router-view />
  <br>
  <el-button onclick="window.location.href='/api/download'">下载</el-button>
</template>

<script>
export default {
  methods:{
    oncilckmenu:function (key,keypath){
        console.debug(keypath);
        if (key=="1")
        {
          window.location.href="/#/write";
        }
        if (key=="2")
        {
          window.location.href="/#/read";
        }
    }
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 0;
}
</style>
